home *** CD-ROM | disk | FTP | other *** search
/ The Netter Presenter: Ur…ion in Overactive Bladder / The Netter Presenter: Urinary System - Structure & Function in Overactive Bladder.iso / mac / UrinarySystem.app / Contents / Main.dxr / Internal_153_rename list.ls < prev    next >
Encoding:
Text File  |  2005-01-18  |  1.1 KB  |  36 lines

  1. global gCurrentList, glAlphabet, gRenameListName, gDialogAction, glPFListNames
  2.  
  3. on mouseUp me
  4.   gRenameListName = EMPTY
  5.   if gCurrentList = EMPTY then
  6.     exit
  7.   end if
  8.   gDialogAction = #RenameList
  9.   setUpResponseDialog("Rename List")
  10.   runResponseDialog()
  11.   if (gRenameListName = EMPTY) or (gRenameListName = VOID) then
  12.     abort()
  13.   end if
  14.   set the stageColor to the stageColor
  15.   repeat with x = 1 to gRenameListName.char.count
  16.     if getOne(glAlphabet, gRenameListName.char[x]) = 0 then
  17.       alert("File and list names must contain only alphabetic characters and numbers without spaces.  Please reenter.")
  18.       abort()
  19.     end if
  20.   end repeat
  21.   if gRenameListName.char.count > 31 then
  22.     alert("List names may not be longer than 31 characters.")
  23.     abort()
  24.   end if
  25.   repeat with y = 1 to glPFListNames.count
  26.     if symbol(gRenameListName) = symbol(getAt(glPFListNames, y)) then
  27.       alert("The name is in use.  Please select another.")
  28.       abort()
  29.     end if
  30.   end repeat
  31.   RenameAList()
  32.   UpdatePersonalFileData()
  33.   WritePersonalFileNoDialog()
  34.   member("PFlist").text = gCurrentList
  35. end
  36.